home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 1996 April
/
Software of the Month Club 1996 April.iso
/
pc
/
os2
/
httpacc
/
readme.130
< prev
next >
Wrap
Text File
|
1996-02-21
|
15KB
|
374 lines
HTTPAcc Version 1.30 November, 1995
AB Software
3109 Village Rd West
Norwood, MA 02062-2542
USA
awysocki@bearsoft.com
Current files can always be found at:
http://www.bearsoft.com/abs/httpacc.html
-----------------------------------------------------------------------------
NOTE: This version uses objects from VisPro C development environment. This
is not a problem. But I do have to say the following:
You can freely distribute any executable created with VisPro/C to anyone
without restrictions or royalties. You can distribute the ad-on objects DLLs
freely provided you do wo with a license prohibiting the recipient from copying
(except for backup purposes) an/or transferring the dynamic link libraries.
SO: You can only copy the .DLL files for backup purposes!
-----------------------------------------------------------------------------
If you like this program and use it day to day please register by
sending $20.00 in US Dollars to AB Software at the above address
This is the quick and dirty setup doc for HTTPAcc
This program will allow you to reset the OS2HTTPD ACCESS.LOG file
each night. Remember that the LOG will be RESET EACH night. The
only catch is how many LOG files do you want hanging around.
Currently the unique host list is trashed at each reset. I have no need
to write these hosts out to any file. If you need this list then let me
know and I will add something in.
The first step is the install and setup.
----------------------------------------------------------------------------
INSTALL:
Put the program in the d:\OS2HTTPD\BIN directory, along with the .DLL's.
This should be the standard place to put the file.
----------------------------------------------------------------------------
Command Line Parameters
-b# - Turn ON or OFF batch mode (# = 0 or 1)
-a# - Turn ON or OFF AutoScroll mode (#= 0 or 1)
-d--- - Set the mode for Daily Access to be saved (---= YES or NO)
-h#### - Set the number of minutes between running the UPDATE REXX command
can be between 0 and 1441
-u# - Turn ON or OFF Update mode (#= 0 or 1)
-l# - Turn ON or OFF List Update mode (#= 0 or 1)
xxxxxxxx - The name of the ACCESS.LOG file to process
Here is an example .CMD file to process old .ACC files. This example went and processed
my old .ACC files to give me monthly stats.
--------------------------------------
FOR %%f in (*.acc) do httpacc %%f -b -a0 -d0 -h1441 -l0 -u0
----------------------------------------------------------------------------
HTTPACC.INI values
You will then need to edit and customize the HTTPACC.INI file (Windows ASCII file)
The keywords you can specify are:
[HTTPAccess]
Debug=
Test=
StartUpTime=
WaitTime=
PauseTime=
HTMLStats=
AccessLog=
DailyACC=
AutoReset=
ManualReset=
AutoScroll=
MaxLines=
BatchMode=
SaveYearlyStats=
DisplayUpdate=
UpdateList=
[HTTPAccessREXX]
MaxPages=
MaxHosts=
PastDays=
HTMLUpdateCMD=
HTMLFinalCMD=
haTitle=
haUpdateGIF=
haFinalGIF=
haWeeklyGIF=
haURLUpdateGIF=
haURLFinalGIF=
haURLWeeklyGIF=
haUpdateHTML=
haFinalHTML=
haWeeklyHTML=
-----------------------------------------------------------------------------
The following INI entries fall UNDER the heading of [HTTPAccess]
Debug= Set to ON or OFF to log additional information to the HTTPACC.DBG
file. The default is OFF
Test= Set to ON or OFF to allow you to run the FINAL REXX.CMD file before the
end of day. Setting to ON will unhide a button on the screen. The default is OFF
StartUpTime= The number of miliseconds to wait before the program starts
processing the ACCESS.LOG file. This is useful incase the server crashes,
you may want to let other processes start before his process starts.
The default is set to 60000 (1 Minute)
WaitTime= The number of miliseconds to wait before checking the log again.
This timeout will be used when there are no new lines in the ACCESS.LOG.
You want to try to get this number big. If its too small then the process
will eat up lots of the CPU cycles. The default if not specified is 5000
(5 seconds)
PauseTime= The number of miliseconds to wait between read with data.
If the process finds a new line in the log it will process the line, it will
then wait this PauseTime between reading the next line. The default if not
specified is 100 (.1 second)
HTMLStats= The number of MINUTES between running the REXX chart.cmd program
For an active server increase this! The default is set to 0 OFF
AccessLog= This is the full path and file name of the access log. There
is NO DEFAULT so this *MUST* be specified. You should use something like,
d:\os2httpd\logs\access.log
DailyACC= You can shut off the copy of the ACCESS.LOG file to .ACC file
The default is YES
AutoReset= Set to Yes or No. If set to YES then at the change of the day
the ACCESS.LOG file will be reset. The default is Yes.
ManualReset= I put this in mainly for testing, but if you want you can reset
the log anytime you want. Just set this variable to On or Off and the
'Reset Log' button will be turned On/Off. When the button is pressed the
Log will be reset and the stats will be written to the HTTPACC.LOG file.
The default is Off.
AutoScroll= This will allow defaults of the AutoScroll Check box. If you
want scrolling on then set this to On/Yes. The default is On
MaxLines= This is the number of ACCESS.LOG lines to keep on the screen in the
scroll box. The default is 200. I have mine set at 5000.
BatchMode= Set to ON or OFF to allow the program to run the final REXX command
and terminate without operator intervention. Use this to process old or previous
days ACCESS.LOG files. There is also a command line parameter to override this option.
The default is OFF
SaveYearlyStats= Set to YES or NO to allow HTTPAcc to keep daily summaries which can
be used to show past history. Summary information is passed to the REXX final routine.
The default is YES
DisplayUpdate= Set to ON or OFF. This will allow the program to run a little quicker if
you don't need to see updates every log entry. This should only be set to OFF when running
in Batch mode. The default is ON
UpdateList= Set to ON or OFF. This will allow the program to shut off entries into the
scroll list on the screen. If you are running with limited memory, this can save the
machine from keeping a copy of the last 'MaxLines' from the ACCESS.LOG file in memory.
The default is ON.
------
The following INI entries fall UNDER the heading of [HTTPAccessREXX]
MaxPages= The maximum number of pages to export to the REXX program
The default is 25
MaxHosts= The maximum number of top hosts to export to the REXX program
The default is 25
PastDays= The number of past days to show when creating the GIF file for stats. This
information is passed to the REXX FINAL program to process.
The default is 24
HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
timer pops. This will be called everytime the stats timer expires
There is no default. If left blank then no update rexx program will be called.
HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
expires (flips). This can be the same or different from the UPDATE Rexx
program. There is no default.
7DayStats= The name of the file to keep 7 days worth of data. The
default is 'SEVEN.DAT'
These variables are not use just exported to the REXX programs
haTitle= Title of the GRAPH
haUpdateGIF= The name of the Update GIF file
haFinalGIF= The name of the FINAL stats for the day GIF file
haWeeklyGIF= The name of the last # of days GIF file
haURLUpdateGIF= The name of the Update GIF file for the HTML
haURLFinalGIF= The name of the FINAL stats for the day GIF file for the HTML
haURLWeeklyGIF= The name of the last # of days stats for the GIF file for the HTML
haUpdateHTML= The name of the HTML file for updates
haFinalHTML= The name of the HTML file for the final stats
haWeeklyHTML= The name of the HTML file for the weekly stats (currently not used)
----------------------------------------------------------------------------
Daily .ACC file
This is a copy of the ACCESS.LOG file, any records that are processed
are put in this file. Its a Daily copy of the ACCESS.LOG file, only records
for that day are placed in this file. This can be turned off if you don't
want to keep the daily log files, you would do this by setting DailyACC=OFF
in the .INI file
yymmmdd.ACC
yy = Two digit year
mmm = Alpha month (Jan, Feb, Mar, Apr...)
dd = Two digit month
----------------------------------------------------------------------------
HTTPACC.LOG
The httpacc.log file is a log file that is used to write the stats out for
the day. Currently the information included is:
mm/dd/yy hh:mm:ss:### , mm/dd/yyyy, # , #, #, #, #, #, #, #
Where its the Date, Time then followed by
The date of the data - NOTE this can vary if you only process your log once
a week
HTML Requests
NonHTML Requests
Script Requests
Malformed Requests
Total Number of bytes sent.
Total number of unique hosts
Total number of minutes of processing
Total number of unique documents processed
---------------------------------------------------------------------------
REXX Variables
When the REXX program that is called to process the stats the following
variables are available to be used. Note the REXX programs are called
by HTTPAcc depending on the time specified by HTMLStat= variable in the
.INI file. You do not need to call the rexx program, httpacc will. And
when the programs are called the following variables will be set in the
REXX variable pool. So you can just reference them from your rexx
program.
haRequests. - STEM variable of hourly requests 1-24
haMaxRequests - Highest request number per hour
haMaxRequestsIndex - Which hour had the highest requests
haUnique. - STEM variable of hourly unique hosts 1-24
haMaxUnique - Hightest unique host count per hour
haMaxUniqueIndex - Which hour had the hightest count of unique hosts
haTotalMinutes - Total minutes running
haHour - Total Hours Running in hh:mm format
haMinute - Total minutes running in hh:mm format
haStartHour - Start hour
haStartMin - Start minute
haMon - Month (Jan, Feb...)
haDay - Day 1, 2, 3, ...
haYear - Year 1995, ...
haDOW - Day of the Week
haJulian - Julian Date
haJulianYear - Julian Date for the year 1-366
haTopHostsCnt - The number of hosts in the list This will never
be greater than MaxPages as set in the .INI file
haTopHosts.Str. - STEM variable with list of top hosts
haTopHosts.Cnt. - STEM variable with list of top hosts - counts
haTopPagesCnt - The number of pages in the list
haTopPages.Str. - STEM variable of top page hits
haTopPages.Cnt. - STEM variable of top page hits - counts
haHTMLReq - Total number of HTML request
haNonHTMLReq - Total number of NON HTML requests
haScriptReq - Total number of CGI/Script requests
haMalformedReq - Total number of malformed requests
haTotalBytes - Total number of bytes sent
haYearStats.0 - the same as PastDays in the .INI file
haYearStats.TotalHosts. - Total number of unique hosts for that day
haYearStats.TotalDocs. - Total number of unique documents for that day
haYearStats.TotalReqs. - Total number of requests for that day
haYearStats.TotalMinutes. - Total number of minutes of process time for that day
haYearStats.TotalBytes. - Total number of bytes sent for that day
haYearStats.Mon. - Month for that date
haYearStats.Day. - Days for the date
haYearStats.Year. - Year for the Date
These variables are defined from the .INI file
haTitle - Title
haFinalGIF - FinalGIF
haUpdateGIF - UpdateGIF
haURLFinalGIF - FinalGIF
haURLUpdateGIF - UpdateGIF
haFinalHTML - FinalHTML
haUpdateHTML - UpdateHTML
---------------------------------------------------------------------------
REXX functions
HTTPAccLoadINI -
Read in an INI file and set the same REXX variable
There are three ways to call the function, with 1 to 3 parameters.
rc = HTTPAccLoadIni('ANDY')
- Will load Variable ANDY from under [HTTPAccessREXX] Section
in the HTTPAcc.INI file. The REXX variable will be called ANDY
rc = HTTPAccLoadIni('ANDY', '[TEST]')
- Will load Variable ANDY from under [TEST] Section
in the HTTPAcc.INI file
rc = HTTPAccLoadIni('ANDY', '[TEST]', 'C:\OS2HTTPD\BIN\ANDY.INI')
- Will load Variable ANDY from under [TEST] Section
in the ANDY.INI file
---------------------------------------------------------------------------
Version 1.30 - Fixes (Nov 1995)
- Added in Day of the Week code 'haDOW'
- added support for BATCH Processing
- added support for command line parms to override .INI file
- Store yearly stats by hour/day/year in 'HA19xx.STA' file
- Allow for Read of INI from from REXX
- New last 24 day stats
- Updated Chart to include Unique documents/hour
- Updated Charts to include last 24 days of of processing
Version 1.21 - Fixes (Nov 1995)
- Added in the code to support DailyACC .INI variable
- Added Time stamp for Status Line
Version 1.20 - Changes (Oct 1995)
- Added in HTML graphs (.GIF)
- New output options for Weekly & Monthly stats
- Added top ### list of documents and hosts
- Removed auto HTML report of stats, moved to a REXX function.
so you can customize the output to what you want!!
Version 1.10 - Changes
- Removed KeepLogs= variable from INI file, now all output logs will be
created using yymmmdd.ACC where yy=year, mmm=Jan, Feb..., and dd=Day 01..
- Added in Charting of accesses per hour
- Added in support for HTML stats output
- Added in support for unique hosts counts
- reformatted screen
Version 1.11 - Changes
- Fixed bug in calculations of Hourly and Minute requests on the STATS.HTML
page
-------------------
--- end of file ---
-------------------